package com.xusheng.cli.common.exception;


import com.xusheng.cli.common.enums.ResultEnum;

/**
 * @author jy
 * @since 2021-11-19 13:16
 */
public class ServiceException extends RuntimeException {

	private static final long serialVersionUID = -1372752282914104603L;

	private ResultEnum code;

	public ServiceException(String message) {
		super(message);
	}

	public ServiceException(String message, ResultEnum code) {
		super(message);
		this.code = code;
	}

	public ResultEnum getCode() {
		return code;
	}

	@Override
	public String getMessage() {
		return super.getMessage();
	}


}